const appId = "41222117"
const appKey = "Kg4LZew8vhXTWSTNuvtyG6S3"
const secretKey = "KvUPzoMtYysyYxYbVASptYmq67xSGqwu"
const url =
	`https://aip.baidubce.com/oauth/2.0/token?client_id=${appKey}&client_secret=${secretKey}&grant_type=client_credentials`
exports.getToken = async function() {
	
	const res = await uniCloud.httpclient.request(url, {
		method: 'POST',
		contentType: 'json', // 指定以application/json发送data内的数据
		dataType: 'json' // 指定返回值为json格式，自动进行parse
	})

	console.log("1111111",res)
	// console.log("++++++", res.data.expires_in, res.data.access_token)
	return res.data
}